<template>
  <el-dialog
    title="提示"
    :visible="showDialog"
    width="50%"
    @close="$parent.closeFiltrateBtn()"
  >
    <!-- <slot name="main"></slot> -->
    <!-- <el-row slot="main"> -->
    <el-row v-if="index === 0">
      <i class="el-icon-warning" style="color: goldenrod; font-size: 30px"></i>
      <span style="font-size: 20px; margin-left: 10px"
        >此操作将永久删除该题目, 是否继续?</span
      >
    </el-row>
    <el-row v-else>
      <i class="el-icon-info" style="font-size: 30px"></i>
      <span style="font-size: 20px; margin-left: 10px"
        >此操作将该题目加入精选题目, 是否继续?</span
      >
    </el-row>

    <el-row type="flex" justify="end" style="top: 20px">
      <slot name="footer"></slot>
      <el-button type="primary" size="small" @click="deleteBtn(0)"
        >确定</el-button
      >
    </el-row>
  </el-dialog>
</template>

<script>
// import { remove } from '@/api/hmmm/questions.js'

export default {
  name: 'filtrateDialog',
  props: {
    showDialog: {
      type: Boolean,
      default: false
    },
    index: {
      type: Number,
      default: 0
    }

  },
  data () {
    return {}
  },
  created () {},
  methods: {
    // 弹框删除功能
    deleteBtn (i) {
      // 判断i是0还1 0是删除 1是加入精选
      if (i === 0) {
        this.$parent.deleteOk()
      } else if (i === 1) {
        this.$parent.addOk()
      }
    }
  },
  computed: {},
  watch: {},
  components: {}
}
</script>

<style lang="scss" scoped>
</style>
